@extends('home/layout/master')
@section('title', $request->input('keyword').$configs["cfg_title"])
@section('keywords', $request->input('keyword'))
@section('description', $request->input('keyword'))

@section('head')
    <style>
        .pagination { display: inline-block; padding-left: 0; margin: 20px 0; border-radius: 4px; }
        .pagination li { display: inline; }
        .pagination li a,.pagination li span { position: relative; float: left; padding: 6px 12px; line-height: 1.428571429; text-decoration: none; background-color: #fff; border: 1px solid #ddd; }
        .pagination li:first-child a { margin-left: 0; border-bottom-left-radius: 4px; border-top-left-radius: 4px; }
        .pagination li:last-child a { border-top-right-radius: 4px; border-bottom-right-radius: 4px; }
        .pagination li a:hover, .pagination li a:focus { background-color: #eee; }
        .pagination .active a, .pagination .active a:hover, .pagination .active a:focus { z-index: 2; color: #fff; cursor: default; background-color: #428bca; border-color: #428bca; }
        .pagination .disabled a, .pagination .disabled a:hover, .pagination .disabled a:focus { color: #999; cursor: not-allowed; background-color: #fff; border-color: #ddd; }
        .pagination-lg li a { padding: 10px 16px; font-size: 18px; }
        .pagination-sm li a, .pagination-sm li span { padding: 5px 10px; font-size: 12px; }
        .pagination .active span{background-color: #eee;}
        .pagination .disabled{cursor: not-allowed;filter: alpha(opacity=65);-webkit-box-shadow: none;box-shadow: none;opacity: .65;}
    </style>
@endsection

@section('body')
    <article>
        <!--lbox begin-->
        <div class="lbox">
            <div class="whitebg bloglist">
                <h2 class="htitle">
                    <span class="con_nav">您现在的位置是：<a href="/">首页</a>&nbsp;&gt;&nbsp;<a href="">标签搜索页</a></span>
                    搜索结果
                </h2>
                <ul>
                    @foreach($listData as $v)
                        <li>
                            <h3 class="blogtitle"><a href="{{ url('/article/'.$v->id) }}" target="_blank">{{ $v->title }}</a></h3>
                            <?php
                            if(!empty($v->picname)){
                            ?>
                            <span class="blogpic imgscale"><i><a href="{{ url('/type/'.$v->type_id) }}">{{ $v->types->name }}</a></i><a href="{{ url('/article/'.$v->id) }}" title="{{ $v->title }}"><img src="{{ $v->picname }}" alt="{{ $v->title }}"></a></span>
                            <?php } ?>
                            <p class="blogtext">{{ $v->description }}</p>
                            <p class="bloginfo"><i class="avatar"><a href='/about/' target=_blank><img src="{{ $v->face ? $v->face : '/static/images/tx10.jpg' }}" border=0 width='30' height='30' alt='{{ $v->nickname }}'></a></i><span></span><span>{{ date('Y-m-d', $v->addtime) }}</span><span>【<a href="{{ url('/type/'.$v->type_id) }}">{{ $v->types->name }}</a>】</span></p>
                            <a href="{{ url('/article/'.$v->id) }}" class="viewmore">阅读更多</a>
                        </li>
                    @endforeach
                </ul>
                <!--pagelist-->
                <div class="pagelist">
                    {{ $listData->links() }}
                </div>
                <!--pagelist end-->
            </div>
            <!--bloglist end-->
        </div>
        <div class="rbox">
            <div class="whitebg paihang">
                <h2 class="htitle">点击排行</h2>
                @foreach($articleClick as $k=>$v)
                    <section class="topnews imgscale"><a href="{{ url('/article/'.$v->id) }}"><img src="{{ empty($v->picname) ? '/static/images/b02.jpg' : $v->picname }}" alt="{{ $v->title }}" title="{{ $v->title }}"><span>{{ $v->title }}</span></a></section>
                    <?php if($k == 0){ break; } ?>
                @endforeach
                <ul>
                    @foreach($articleClick as $k=>$v)
                        <?php if($k == 0){ continue; } ?>
                        <li><i></i><a href="{{ url('/article/'.$v->id) }}" title="{{ $v->title }}" target="_blank">{{ $v->title }}</a></li>
                    @endforeach
                </ul>
            </div>
            <div class="whitebg tuijian">
                <h2 class="htitle">本栏推荐</h2>
                @foreach($articlePraise as $k=>$v)
                    <section class="topnews imgscale"><a href="{{ url('/article/'.$v->id) }}"><img src="{{ empty($v->picname) ? '/static/images/2.jpg' : $v->picname }}" alt="{{ $v->title }}" title="{{ $v->title }}"><span>{{ $v->title }}</span></a></section>
                    <?php if($k == 0){ break; } ?>
                @endforeach
                <ul>
                    @foreach($articlePraise as $k=>$v)
                        <?php if($k == 0){ continue; } ?>
                        <li><a href="{{ url('/article/'.$v->id) }}" title="{{ $v->title }}" target="_blank"><i><img src="{{ empty($v->picname) ? '/static/images/2.jpg' : $v->picname }}"></i>
                                <p>{{ $v->title }}</p>
                            </a></li>
                    @endforeach
                </ul>
            </div>
            <div class="ad whitebg imgscale">
                <ul>
                    <a href='/' target=_blank><img src="{{asset('/static/images/ad.jpg')}}"></a>      </ul>
            </div>
            <div class="whitebg cloud">
                <h2 class="htitle">标签云</h2>
                <ul>
                    @foreach($tagsData as $v)
                        <a href="{{ url('/tag/'.$v->id) }}" target="_blank">{{ $v->name }}</a>
                    @endforeach
                        <a href="{{ url('/tags/') }}">所有标签</a>
                </ul>
            </div>

            <div class="ad whitebg imgscale">
                <ul>
                    <a href='/' target=_blank><img src="{{asset('/static/images/ad02.jpg')}}"></a>      </ul>
            </div>
            <div class="card">
                <h2>我的名片</h2>
                <p>网名：随心</p>
                <p>职业：PHP程序员</p>
                <p>现居：湖北省-武汉市</p>
                <p>Email：{{ $configs["cfg_email"] }}</p>
                <ul class="linkmore">
                    <li><a href="/" target="_blank" class="iconfont icon-zhuye" title="网站地址"></a></li>
                    <li><a href="http://mail.qq.com/cgi-bin/qm_share?t=qm_mailme&amp;email={{ $configs['cfg_email'] }}" target="_blank" class="iconfont icon-youxiang" title="我的邮箱"></a></li>
                    <li><a href="http://wpa.qq.com/msgrd?v=3&amp;uin={{ $configs['cfg_qq'] }}&amp;site=qq&amp;menu=yes" target="_blank" class="iconfont icon---" title="QQ联系我"></a></li>
                    <li id="weixin"><a href="#" target="_blank" class="iconfont icon-weixin" title="关注我的微信"></a><i><img src="{{asset('/static/images/wx.jpg')}}"></i></li>      </ul>
            </div>
        </div>
    </article>
@endsection